@import "../../../../styles/index.less";
.calendar {
  background: @primary-light;
  border-radius: 16px;
  padding: 20px;
  // flex: 1;
  // overflow-y: scroll;
  border-radius: 0 0 32px 32px;
  height: 180px;
  transition: height 0.3s ease;
  
  &.expanded {
    height: 480px;
  }
  
  .expandButton {
    background: @bg-primary;
  }
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.title {
  font-size: 32px;
  font-weight: bold;
  color: #333;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-grow: 1;

}

.rightControls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.monthTitle {
  font-size: 28px;
  color: #333;

}

.monthButton {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255, 255, 255);
  border-radius: 12px;
  background: rgb(250, 250, 250);

  &:active {
    opacity: 0.8;
  }
}

.expandButton {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255, 255, 255);
  border-radius: 12px;
  background: rgb(250, 250, 250);

  .expandIcon {
    width: 80%;
    height: 80%;
    transition:  transform 0.1s linear;
  }

  .rotated {
    transform: rotateX(180deg);
  }
}

// 周视图样式
.weekView {
  height: calc(100% - 72px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

// 月视图样式
.monthView {
  height: calc(100% - 72px);
  display: flex;
  flex-direction: column;
  
  .weekHeader {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
  }

  .weekdayLabel {
    width: 14.28%;
    text-align: center;
    font-size: 24px;
    color: #999;
  }

  .monthDaysContainer {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    overflow-y: auto;
  }
}

// 日期项通用样式
.dayItem {
  display: flex;
  flex-direction: column;
  align-items: center;

  // 周视图中的样式
  .weekView & {
    padding: 8px 0;

    .weekday {
      font-size: 24px;
      color: #999;
      margin-bottom: 8px;
    }
  }

  // 月视图中的样式
  .monthView & {
    width: 14.28%;
    padding: 8px 0;
  }

  .day {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #333;
    border-radius: 30px;
  }

  &.todayOutline .day {
    border: 2px dashed @primary-color;
  }

  &.selected .day {
    background: @primary-color;
    color: #fff;
  }

  &.grayed .day {
    color: #ccc;
  }
}
